Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Defining user interface events
The
CHOOSEevent is the one you want to capture. An event is an action that happens while the application is running that Progress can intercept for you. Some events are associated with particular kinds of user interface objects, such as theCHOOSEevent for a button. Others are defined for mouse clicks and other mouse events.
![]()
To define an event for the button:
- Click the New button in the Section Editor to see a list of all the events that you can define for the current object:
![]()
The
CHOOSEevent is the most common event for a button, so that’s the event the Section Editor offers you by default.- Click Cancel to exit the Choose Event dialog box and return to the Section Editor.
- In the Section Editor, press CTRL+V or select the menu item Edit
Paste to paste the code you copied from the
enable_UIprocedure into your trigger.
![]()
To go back and get the statement that opens the Order query for you:
- Reselect the
enable_UIprocedure. You can do this by selecting Procedures from the Section type list. Or you can click the List button, which brings up a list of all editable sections:
![]()
- Copy the statement
{&OPEN-BROWSERS-IN-QUERY-CustQuery}fromenable_UI, go back to your trigger block, and paste it at the end of the block:
![]()
This is the code that repositions to the first Customer, displays it, and opens a query to display its Orders.
![]()
To repeat these steps for a Next button:
- Click the Button icon on the Palette.
- Drop another button onto your design window next to the First button.
- Rename the button BtnNext and change its label to Next.
- Copy the block of code from the First button and paste it into the same section for the Next button.
- Change the first statement to
GET NEXT CustQuery. This advances to the next record in the set of Customers in New Hampshire when you click the button.- Save your procedure by selecting File
Save or by clicking the Save icon in the AppBuilder toolbar, and then rerun it.
Now you should be able to walk through the New Hampshire Customers. As you display each one by clicking the Next button, you see that its Orders are displayed in the browse.
![]()
To finish adding buttons to your window:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |